package org.itboys.weixin.constant;

/**
 * 微信常量
 * @author ChenJunhui
 *
 */
public interface WeixinConstants {
	
	public interface URL {
		//密钥交换token接口地址
		public static final String FETCH_TOKEN_URL="https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential";
		//创建和更新自定义菜单接口地址
		public static final String CREATE_MENU_URL="https://api.weixin.qq.com/cgi-bin/menu/create?access_token=";
		//发送客服消息接口地址
		public static final String SEND_MESSAGE_URL="https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=";
		//获取用户信息接口地址
		public static final String GET_USER_INFO_URL="https://api.weixin.qq.com/cgi-bin/user/info?lang=zh_CN&openid={0}&access_token={1}";
		//上传媒体信息
		public static final String UPLOAD_MEDIA_URL="http://file.api.weixin.qq.com/cgi-bin/media/upload?access_token={0}&type={1}";
		//获取用户列表
		public static final String GET_USER_LIST="https://api.weixin.qq.com/cgi-bin/user/get?access_token={0}&next_openid=";
		//获取生成二维码用的ticket
		public static final String GET_TOWCODE_TICKET="https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=";
		//生成二维码的请求路径
		public static final String GET_TOWCODE_URL = "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=";
		//发送红包请求路径
		public static final String SEND_REDPACK_URL = "https://api.mch.weixin.qq.com/mmpaymkttransfers/sendredpack";
		//企业支付路径
		public static final String COMPANY_PAY_URL = "https://api.mch.weixin.qq.com/mmpaymkttransfers/promotion/transfers";
		//批量发送信息
		public static final String BATCH_SEND_MESSAGE = "https://api.weixin.qq.com/cgi-bin/message/mass/send?access_token=";
	}
	
	/**
	 * 上传微信的多媒体文件类型
	 * @author ChenJunhui
	 *
	 */
	public interface MEDIA_TYPE{
		public static final String IMAGE="image";//图片
		public static final String VOICE="voice";//声音  只支持AMR\MP3
		public static final String VIDEO="video";//视频 只支持 MP4 格式
		public static final String THUMB="thumb";//缩略图
	}
	
	/**
	 * 二维码类型
	 * @author ChenJunhui
	 *
	 */
	public interface TOW_CODE_TYPE{
		public static final String QR_SCENE="QR_SCENE";//临时二维码
		public static final String QR_LIMIT_SCENE="QR_LIMIT_SCENE";//永久二维码
	}

	/**
	 * 返回消息类型：文本
	 */
	public static final String RESP_MESSAGE_TYPE_TEXT = "text";

	/**
	 * 返回消息类型：音乐
	 */
	public static final String RESP_MESSAGE_TYPE_MUSIC = "music";

	/**
	 * 返回消息类型：图文
	 */
	public static final String RESP_MESSAGE_TYPE_NEWS = "news";
	/**
	 * 返回消息类型:发往多客服
	 */
	public static final String RESP_MESSAGE_TYPE_SERVER = "transfer_customer_service";

	/**
	 * 请求消息类型：文本
	 */
	public static final String REQ_MESSAGE_TYPE_TEXT = "text";

	/**
	 * 请求消息类型：图片
	 */
	public static final String REQ_MESSAGE_TYPE_IMAGE = "image";

	/**
	 * 请求消息类型：链接
	 */
	public static final String REQ_MESSAGE_TYPE_LINK = "link";

	/**
	 * 请求消息类型：地理位置
	 */
	public static final String REQ_MESSAGE_TYPE_LOCATION = "location";

	/**
	 * 请求消息类型：音频
	 */
	public static final String REQ_MESSAGE_TYPE_VOICE = "voice";

	/**
	 * 请求消息类型：推送
	 */
	public static final String REQ_MESSAGE_TYPE_EVENT = "event";

	/**
	 * 事件类型：subscribe(订阅)
	 */
	public static final String EVENT_TYPE_SUBSCRIBE = "subscribe";

	/**
	 * 事件类型：unsubscribe(取消订阅)
	 */
	public static final String EVENT_TYPE_UNSUBSCRIBE = "unsubscribe";

	/**
	 * 事件类型：CLICK(自定义菜单点击事件)
	 */
	public static final String EVENT_TYPE_CLICK = "CLICK";
	
	public static final String EVENT_TYPE_URL = "URL";
	
	public static final String ERROR_REQUEST = "大哥 请不要伪造请求!";
}
